using UnityEngine;
using System.Collections;

public class InteractChangeColorSphere : InteractObject
{
    override public void Interact(MonoBehaviour sender)
    {
        if (Input.GetKeyDown(interactButton))
        {
            GameObject[] spheres = GameObject.FindGameObjectsWithTag("FlySphere");

            foreach (GameObject sphere in spheres)
            {
                sphere.renderer.material.color = new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f));
            }
        }
    }
}
